home *** CD-ROM | disk | FTP | other *** search
-
-
- 5 '**File Copy by Webb B. Blackman,Jr. --28 March 1982 **
- 7 CLS:KEY OFF: GOTO 63
- 9 REM**SUBROUTINE FOR STRINGS**
- 11 A% = 1:GOTO 17
- 13 REM**SUBROUTINE FOR NUMBERS**
- 15 A%=0
- 17 Y% = CSRLIN:X%=1+POS(0):TT$="":TTA$="":I%=0
- 19 T$ = INKEY$:IF T$="" THEN 19
- 21 IF T$ =CHR$(13) THEN IF A%=0 THEN 41 ELSE 39
- 23 IF T$ =CHR$(8) THEN 33
- 25 IF T$ =CHR$(0)+CHR$(75) THEN 33
- 27 IF T$=CHR$(44) THEN TTA$=TTA$+T$:TT$=TT$+CHR$(32):GOTO 31
- 29 TT$ =TT$ + T$:TTA$=TTA$ + T$
- 31 I%=I%+1:LOCATE Y%,X%:PRINT TTA$:GOTO 19
- 33 I% = I% -1:IF I% < 0 THEN I%=1
- 35 TTA$ = MID$(TTA$,1,I%):TT$ = MID$(TT$,1,I%)
- 37 LOCATE Y%,(X%+I%):PRINT " ":GOTO 19
- 39 DAT0$ = TTA$:RETURN
- 41 DAT0# = VAL(TT$):RETURN
- 43 '**BOX SUB**
- 45 CLS:LOCATE 2,2,0:PRINT CHR$(201)+STRING$(75,205)+CHR$(187);
- 47 FOR I%=1 TO 20:LOCATE 2+I%,2:PRINT CHR$(186):LOCATE 2+I%,78:PRINT CHR$( 186);:NEXT
- 49 LOCATE 23,2,0:PRINT CHR$(200)+STRING$(75,205)+CHR$(188);
- 51 LOCATE 24,70:PRINT "WBB-82-" P%;:P%=P%+1:IF P%=99 THEN P%=1
- 53 RETURN
- 63 '**TITLE BOX**
- 65 GOSUB 43
- 79 LOCATE 5,31:PRINT "<<< File Copy >>>"
- 81 LOCATE 12,30:PRINT "Webb B. Blackman,Jr."
- 83 LOCATE 17,32:PRINT "March 28, 1982"
- 85 LOCATE 20,34:PRINT "Version 1.0"
- 87 LOCATE 23,25,0:COLOR 16,7:PRINT "Press Control Bar To Continue";
- 89 T$=INKEY$:IF T$="" THEN 89 ELSE IF T$=CHR$(32) THEN COLOR 7,0:CLS ELSE 87
- 91 GOTO 111
- 93 '**Page Heading***
- 95 IF PAGENUM <> 0 THEN LPRINT CHR$(12);
- 99 ON ERROR GOTO 293
- 100 PAGENUM = PAGENUM + 1
- 101 LPRINT
- 103 LPRINT:LPRINT TAB(5);CHR$(14);FIL$;".";EXT$;CHR$(20);
- 105 LPRINT "--printed on ";DATE$;" at ";TIME$;"--Page";PAGENUM
- 107 LPRINT:LPRINT
- 109 RETURN
- 111 '**** Filecopy ******
- 113 '
- 115 '****************************************************
- 117 '** A program to provide a paginated listing of **
- 119 '** Text Files using the IBM 80 CPS Printer. **
- 121 '****************************************************
- 123 GOSUB 43:LOCATE 3,27,0:COLOR 16,7,0:PRINT "<<< Filecopy Selection >>>" :COLOR 7,0,0
- 125 LOCATE 6,5,0:PRINT "Selection:"
- 127 LOCATE 8,10,0:COLOR 16,7,0:PRINT "S";:COLOR 7,0,0:PRINT "elect File,";: COLOR 16,7,0:PRINT "R";:COLOR 7,0,0:PRINT "eset Printer,";:COLOR 16,7,0 :PRINT "P";:COLOR 7,0,0:PRINT "rint File,";:COLOR 16,7,0:PRINT "E";
- 129 COLOR 7,0,0:PRINT "nd : ";:COLOR 0,7,0:PRINT " ";:LOCATE 8,54,0: GOSUB 9:SELECT$=DAT0$:COLOR 7,0,0
- 131 SL$ = MID$(SELECT$,1,1)
- 133 IF SL$<>"S" AND SL$<>"s" AND SL$<>"R" AND SL$<>"r" AND SL$<>"P" AND SL$ <>"p" AND SL$<>"E" AND SL$<>"e" THEN 125
- 135 IF SL$="S" OR SL$="s" THEN GOSUB 217:GOTO 123
- 137 IF SL$="R" OR SL$="r" THEN GOSUB 249:GOTO 123
- 139 IF SL$="E" OR SL$="e" THEN CLS:END
- 141 '**Printing of File
- 143 '*****************************************************
- 145 '** This section of program sets the printer speci- **
- 147 '** fications and prints a listing of the desired **
- 149 '** Text File. **
- 151 '*****************************************************
- 153 GOSUB 43:LOCATE 3,27,0:COLOR 16,7,0:PRINT "<<< Filecopy Printing >>>": COLOR 7,0,0
- 155 LOCATE 6,10,0:PRINT "1. Adjust the paper in the printer so that"
- 157 LOCATE 7,10,0:PRINT " the perforations are at the paper bail."
- 159 LOCATE 9,10,0:PRINT "2. Put the printer ONLINE at this time."
- 161 LOCATE 11,10,0:PRINT "3. Press the ESC key to abort printing of file."
- 165 LOCATE 23,25,0:COLOR 16,7:PRINT "Press Control Bar To Continue";
- 167 T$=INKEY$:IF T$=""THEN 167 ELSE IF T$ = CHR$(32) THEN COLOR 7,0,0:CLS ELSE 165
- 169 GOSUB 43:LOCATE 3,28,0:COLOR 16,7,0:PRINT "<<< Filecopy Listing >>>" :COLOR 7,0,0
- 171 LOCATE 8,10,0:COLOR 23,0,0:PRINT " Press the ESC key to abort printing.
- 173 LPRINT CHR$(18);
- 175 LPRINT CHR$(20);
- 177 LPRINT CHR$(27)+"F";
- 179 LPRINT CHR$(27)+"H";
- 181 IF TYP$="C" OR TYP$="c" THEN LPRINT CHR$(15);
- 183 IF DWP$="Y" OR DYP$="y" THEN LPRINT CHR$(14);
- 185 IF EMP$="Y" OR EMP$="y" THEN LPRINT CHR$(27)+"E";
- 187 IF DSP$="Y" OR DSP$="y" THEN LPRINT CHR$(27)+"G";
- 189 WIDTH "LPT1:",PWIDTH
- 191 PAGENUM = 0
- 193 LINENUM = 1
- 195 IF EOF(1) THEN 211
- 197 LINE INPUT #1,L$
- 199 IF LINENUM = 1 THEN GOSUB 93
- 201 LPRINT L$
- 203 IF INKEY$ = CHR$(27) THEN CLOSE #1:COLOR 7,0,0:GOTO 111
- 205 LINENUM = LINENUM + INT((LEN(L$)+79)/80)
- 207 IF LINENUM > 54 THEN LINENUM = 1
- 209 GOTO 195
- 211 CLOSE #1
- 213 LPRINT CHR$(12)
- 215 GOTO 111
- 217 'Select File
- 219 '***********************************************
- 221 '** This routine obtains the necessary infor- **
- 223 '** mation needed to open the Text File for **
- 225 '** obtaining a listing. **
- 227 '***********************************************
- 229 GOSUB 43:LOCATE 3,28,0:COLOR 16,7,0:PRINT "<<< File Entry Mode >>>": COLOR 7,0,0
- 231 LOCATE 6,5,0:PRINT "Drive (A or B) :";:COLOR 0,7,0:PRINT " " ;:LOCATE 6,27,0:GOSUB 9:COLOR 7,0,0:DRV$=MID$(DAT0$,1,1)
- 233 IF DRV$ <> "A" AND DRV$ <>"B" AND DRV$<>"b" AND DRV$<>"a" THEN 231
- 235 LOCATE 8,5,0:PRINT "Enter File Name :";:COLOR 0,7,0:PRINT " ";:LOCATE 8,27,0:GOSUB 9:COLOR 7,0,0:FIL$ = DAT0$
- 237 LOCATE 10,5,0:PRINT "Enter File Extension :";:COLOR 0,7,0:PRINT " " ;:LOCATE 10,27,0:GOSUB 9:COLOR 7,0,0:EXT$ = DAT0$
- 239 OPEN "I",1,DRV$+":"+FIL$+"."+EXT$
- 243 LOCATE 23,25:COLOR 16,7:PRINT "Press Control Bar To Continue"
- 245 T$=INKEY$:IF T$=""THEN 245 ELSE IF T$ = CHR$(32) THEN COLOR 7,0,0:CLS: RETURN ELSE 243
- 247 '************************************************
- 249 'Reset IBM Printer
- 251 '***********************************************
- 253 '** This routine obtains the necessary infor- **
- 255 '** mation needed to set up the IBM Printer **
- 257 '** with the desired enhancements. **
- 259 '***********************************************
- 261 GOSUB 43:LOCATE 3,27,0:COLOR 16,7,0:PRINT "<<< Reset IBM Printer >>>": COLOR 7,0,0
- 263 LOCATE 6,5,0:PRINT "IBM Printer Enhancements are:"
- 265 LOCATE 7,10,0:COLOR 16,7,0:PRINT "N";:COLOR 7,0,0:PRINT "ormal or ";: COLOR 16,7,0:PRINT "C";:COLOR 7,0,0:PRINT "ompressed Print ? ";:COLOR 0,7,0:PRINT " ";:LOCATE 7,40,0:GOSUB 9:TYP$=DAT0$:COLOR 7,0,0
- 267 IF TYP$ <>"N" AND TYP$<>"n" AND TYP$<>"C" AND TYP$<>"c" THEN 265
- 269 IF TYP$="C" OR TYP$="c" THEN 275
- 271 LOCATE 9,10,0:PRINT "Emphasized Print ? Y/N ";:COLOR 0,7,0:PRINT " ";:LOCATE 9,37,0:GOSUB 9:EMP$=DAT0$:COLOR 7,0,0
- 273 IF EMP$<>"N" AND EMP$<>"n" AND EMP$<>"Y" AND EMP$<>"y" THEN 271
- 275 LOCATE 11,10,0:PRINT "Double Width Print ? Y/N ";:COLOR 0,7,0:PRINT " ";:LOCATE 11,37,0:GOSUB 9:DWP$=DAT0$:COLOR 7,0,0
- 277 IF DWP$<>"N" AND DWP$<>"n" AND DWP$<>"Y" AND DWP$<>"y" THEN 275
- 279 LOCATE 13,10,0:PRINT "Double Strike Print ? Y/N ";:COLOR 0,7,0:PRINT " ";:LOCATE 13,37,0:GOSUB 9:DSP$=DAT0$:COLOR 7,0,0
- 281 IF DSP$<>"N" AND DSP$<>"n" AND DSP$<>"Y" AND DSP$<>"y" THEN 279
- 283 LOCATE 15,5,0:PRINT "Enter the desired line width: ";:COLOR 0,7,0: PRINT " ";:LOCATE 15,36,0:GOSUB 13:PWIDTH=DAT0#:COLOR 7,0,0
- 285 IF PWIDTH < 1 OR PWIDTH > 132 THEN 283
- 287 DEF SEG: POKE 106,0
- 289 LOCATE 23,25:COLOR 16,7:PRINT "Press Control Bar To Continue"
- 291 T$=INKEY$:IF T$=""THEN 291 ELSE IF T$ = CHR$(32) THEN COLOR 7,0,0:CLS: RETURN ELSE 287
- 293 IF ERR = 24 THEN FOR TM%=1 TO 20000:NEXT:RESUME NEXT
- T$ = CHR$(32) THEN COLOR 7,0,0:CLS: RETURN ELSE 287
- 293 IF ERR = 24 THEN